echo off
setlocal

:: Check to continue uninstallation.
echo.
echo Are you sure you want to uninstall YVC-1000 Configurator ?
echo Please press 'Y' to continue, or press 'N' to quit ...
echo.
set /p _KEY_=""
IF "%_KEY_%"=="y" (goto _UNINSTALL_)
IF "%_KEY_%"=="Y" (goto _UNINSTALL_)

exit

:_UNINSTALL_
:: File path of INI file.
set _APPDIR_="YVC-1000 Configurator"
:: APPDATA="C:\Users\<UserName>\AppData\Roaming"
set _PATH_=%APPDATA%\%_APPDIR_%

:: Delete INI file.
IF EXIST %_PATH_% (rmdir /s /q %_PATH_%)

:: Check to deleted.
IF EXIST %_PATH_% (goto _ERR_) else (goto _COMPLETE_)

:_COMPLETE_
echo.
echo.
echo ========================================
echo YVC-1000 Configurator Uninstallation has
echo been completed successfully.
echo ========================================
echo.
echo.
goto _FIN_

:_ERR_
echo.
echo.
echo ==========================================
echo Failed to uninstall YVC-1000 Configurator.
echo ==========================================
echo.
echo.
goto _FIN_


:_FIN_
endlocal
pause
